class ServerWeightDetailData {
  List<SriList>? sriList;
  ServiceInfo? serviceInfo;
  PatientInfo? patientInfo;

  ServerWeightDetailData({this.sriList, this.serviceInfo, this.patientInfo});

  ServerWeightDetailData.fromJson(Map<String, dynamic> json) {
    if (json["sriList"] is List) {
      sriList = json["sriList"] == null
          ? null
          : (json["sriList"] as List).map((e) => SriList.fromJson(e)).toList();
    }
    if (json["serviceInfo"] is Map) {
      serviceInfo = json["serviceInfo"] == null
          ? null
          : ServiceInfo.fromJson(json["serviceInfo"]);
    }
    if (json["patientInfo"] is Map) {
      patientInfo = json["patientInfo"] == null
          ? null
          : PatientInfo.fromJson(json["patientInfo"]);
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    if (sriList != null) {
      _data["sriList"] = sriList?.map((e) => e.toJson()).toList();
    }
    if (serviceInfo != null) {
      _data["serviceInfo"] = serviceInfo?.toJson();
    }
    if (patientInfo != null) {
      _data["patientInfo"] = patientInfo?.toJson();
    }
    return _data;
  }
}

class PatientInfo {
  int? id;
  int? consumerId;
  String? patientNo;
  String? patientName;
  String? phone;
  String? gender;
  String? birthday;
  dynamic patientAge;
  dynamic area;
  String? address;
  String? idCardNo;
  String? createdBy;
  dynamic tagsFromDoctor;
  String? createdTime;

  PatientInfo(
      {this.id,
      this.consumerId,
      this.patientNo,
      this.patientName,
      this.phone,
      this.gender,
      this.birthday,
      this.patientAge,
      this.area,
      this.address,
      this.idCardNo,
      this.createdBy,
      this.tagsFromDoctor,
      this.createdTime});

  PatientInfo.fromJson(Map<String, dynamic> json) {
    if (json["id"] is int) {
      id = json["id"];
    }
    if (json["consumerId"] is int) {
      consumerId = json["consumerId"];
    }
    if (json["patientNo"] is String) {
      patientNo = json["patientNo"];
    }
    if (json["patientName"] is String) {
      patientName = json["patientName"];
    }
    if (json["phone"] is String) {
      phone = json["phone"];
    }
    if (json["gender"] is String) {
      gender = json["gender"];
    }
    if (json["birthday"] is String) {
      birthday = json["birthday"];
    }
    patientAge = json["patientAge"];
    area = json["area"];
    if (json["address"] is String) {
      address = json["address"];
    }
    if (json["idCardNo"] is String) {
      idCardNo = json["idCardNo"];
    }
    if (json["createdBy"] is String) {
      createdBy = json["createdBy"];
    }
    tagsFromDoctor = json["tagsFromDoctor"];
    if (json["createdTime"] is String) {
      createdTime = json["createdTime"];
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["id"] = id;
    _data["consumerId"] = consumerId;
    _data["patientNo"] = patientNo;
    _data["patientName"] = patientName;
    _data["phone"] = phone;
    _data["gender"] = gender;
    _data["birthday"] = birthday;
    _data["patientAge"] = patientAge;
    _data["area"] = area;
    _data["address"] = address;
    _data["idCardNo"] = idCardNo;
    _data["createdBy"] = createdBy;
    _data["tagsFromDoctor"] = tagsFromDoctor;
    _data["createdTime"] = createdTime;
    return _data;
  }
}

class ServiceInfo {
  String? servicestatus;
  String? serviceTime;
  String? packagename;
  String? itemname;
  String? teamname;
  String? doctornick;
  String? hospname;
  int? medicalAdviceId;
  int? checkId;
  String? nameEn;

  ServiceInfo(
      {this.servicestatus,
      this.serviceTime,
      this.packagename,
      this.itemname,
      this.teamname,
      this.doctornick,
      this.hospname,
      this.medicalAdviceId,
      this.checkId,
      this.nameEn});

  ServiceInfo.fromJson(Map<String, dynamic> json) {
    if (json["servicestatus"] is String) {
      servicestatus = json["servicestatus"];
    }
    if (json["serviceTime"] is String) {
      serviceTime = json["serviceTime"];
    }
    if (json["packagename"] is String) {
      packagename = json["packagename"];
    }
    if (json["itemname"] is String) {
      itemname = json["itemname"];
    }
    if (json["teamname"] is String) {
      teamname = json["teamname"];
    }
    if (json["doctornick"] is String) {
      doctornick = json["doctornick"];
    }
    if (json["hospname"] is String) {
      hospname = json["hospname"];
    }
    if (json["medicalAdviceId"] is int) {
      medicalAdviceId = json["medicalAdviceId"];
    }
    if (json["checkId"] is int) {
      checkId = json["checkId"];
    }
    if (json["nameEn"] is String) {
      nameEn = json["nameEn"];
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["servicestatus"] = servicestatus;
    _data["serviceTime"] = serviceTime;
    _data["packagename"] = packagename;
    _data["itemname"] = itemname;
    _data["teamname"] = teamname;
    _data["doctornick"] = doctornick;
    _data["hospname"] = hospname;
    _data["medicalAdviceId"] = medicalAdviceId;
    _data["checkId"] = checkId;
    _data["nameEn"] = nameEn;
    return _data;
  }
}

class SriList {
  int? id;
  String? createTime;
  String? userId;
  int? stat;
  dynamic patientName;
  String? patientUserId;
  String? doctorUserId;
  String? checkTime;
  String? evaluate;
  int? medicalAdviceId;
  int? value;
  dynamic patientEvaluate;
  dynamic patientEvaluateTime;
  int? score;
  int? patientInfoId;

  SriList(
      {this.id,
      this.createTime,
      this.userId,
      this.stat,
      this.patientName,
      this.patientUserId,
      this.doctorUserId,
      this.checkTime,
      this.evaluate,
      this.medicalAdviceId,
      this.value,
      this.patientEvaluate,
      this.patientEvaluateTime,
      this.score,
      this.patientInfoId});

  SriList.fromJson(Map<String, dynamic> json) {
    if (json["id"] is int) {
      id = json["id"];
    }
    if (json["createTime"] is String) {
      createTime = json["createTime"];
    }
    if (json["userId"] is String) {
      userId = json["userId"];
    }
    if (json["stat"] is int) {
      stat = json["stat"];
    }
    patientName = json["patientName"];
    if (json["patientUserId"] is String) {
      patientUserId = json["patientUserId"];
    }
    if (json["doctorUserId"] is String) {
      doctorUserId = json["doctorUserId"];
    }
    if (json["checkTime"] is String) {
      checkTime = json["checkTime"];
    }
    if (json["evaluate"] is String) {
      evaluate = json["evaluate"];
    }
    if (json["medicalAdviceId"] is int) {
      medicalAdviceId = json["medicalAdviceId"];
    }
    if (json["value"] is int) {
      value = json["value"];
    }
    patientEvaluate = json["patientEvaluate"];
    patientEvaluateTime = json["patientEvaluateTime"];
    if (json["score"] is int) {
      score = json["score"];
    }
    if (json["patientInfoId"] is int) {
      patientInfoId = json["patientInfoId"];
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["id"] = id;
    _data["createTime"] = createTime;
    _data["userId"] = userId;
    _data["stat"] = stat;
    _data["patientName"] = patientName;
    _data["patientUserId"] = patientUserId;
    _data["doctorUserId"] = doctorUserId;
    _data["checkTime"] = checkTime;
    _data["evaluate"] = evaluate;
    _data["medicalAdviceId"] = medicalAdviceId;
    _data["value"] = value;
    _data["patientEvaluate"] = patientEvaluate;
    _data["patientEvaluateTime"] = patientEvaluateTime;
    _data["score"] = score;
    _data["patientInfoId"] = patientInfoId;
    return _data;
  }
}
